/*
 * MathUtils.h
 *
 *  Created on: May 11, 2012
 *      Author: mklingen
 */

#ifndef MATHUTILS_H
#define MATHUTILS_H
#include <cmath>
#include <Eigen/Core>
#include <Eigen/Geometry>
#include <Eigen/Dense>

#define RAD_TO_DEG (180.0f/M_PI)
#define DEG_TO_RAD (M_PI/180.0f)

namespace kling
{

    class MathUtils
    {
        public:
            MathUtils();
            virtual ~MathUtils();

            static float DegreesToRadians(float degrees) { return DEG_TO_RAD * degrees; }
            static float RadiansToDegrees(float radians) { return RAD_TO_DEG * radians; }
            static float TransformToRadians(Eigen::Affine2d& transform);
            static float TransformToDegrees(Eigen::Affine2d& transform) { return RadiansToDegrees(TransformToRadians(transform)); }
    };

} /* namespace kling */
#endif /* MATHUTILS_H */
